module next_pc(
  input  branch,
  input  zero,
  input  [31:0] imm,
  input  [31:0] pc,
  output [31:0] next_pc
);

  assign next_pc = (branch & zero) ? (pc + {imm[30:0], 1'b0}) : (pc + 4);

endmodule